package cn.smart.epic.common.exception;

/**
 * @Auther Uncle_Z
 * @date 2017/8/31 11:33
 * @Email:2545375@qq.com
 * @Descrition 业务异常的封装
 * @since 1.0
 */

public class BussinessException extends RuntimeException {

    /**
     * 友好提示状态码
     */
    private int code;
    /**
     * 友好消息提示
     */
    private String friendlyMsg;

    //业务异常跳转的页面
    private String urlPath;

    public BussinessException(BizExceptionEnum exceptionEnum) {
        this.code=exceptionEnum.getFriendlyCode();
        this.friendlyMsg=exceptionEnum.getFriendlyMsg();
        this.urlPath = exceptionEnum.getUrlPath();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getFriendlyMsg() {
        return friendlyMsg;
    }

    public void setFriendlyMsg(String friendlyMsg) {
        this.friendlyMsg = friendlyMsg;
    }

    public String getUrlPath() {
        return urlPath;
    }

    public void setUrlPath(String urlPath) {
        this.urlPath = urlPath;
    }
}
